using System;
using System.Collections.Generic;
using System.Text;

namespace Test {
	class SqlLoop {

		static void MainZ() {
			DAL dal;
			string sql="select percent_complete from sys.dm_exec_requests(nolock) where command='DbccFilesCompact'";
			while(true)
			{
				dal=new DAL("PON-WPAS05","Infolink");
				Console.Write(dal.Scalar(sql));
				Console.WriteLine(";");
				System.Threading.Thread.Sleep(10000);
			}
		}
		static void MainD() {
			DAL dal;
			string sql="select count(*) from tmp_nps_item_option(nolock)";
			while(true)
			{
				dal=new DAL("PON-WPSQ07-DB","PutawayElmsall");
				Console.Write(dal.Scalar(sql));
				Console.Write(";");

				dal=new DAL("PON-WPSQ04-DB","PutawayStadiumWay");
				Console.Write(dal.Scalar(sql));
				Console.Write(";");

				dal=new DAL("PON-WPSQ02-DB","PutawayDoncaster");
				Console.Write(dal.Scalar(sql));
				Console.Write(";");

				dal=new DAL("PON-WPSQ01-DB","heywoodPutaway");
				Console.Write(dal.Scalar(sql));
				Console.Write(";");

				dal=new DAL("PON-WPSQ12-DB","PutawayDearnePallet");
				Console.Write(dal.Scalar(sql));
				Console.WriteLine(";");
				System.Threading.Thread.Sleep(10000);
			}
		}

	}
}
